/* docsify-themeable custom settings */
:root {
    /* Cover */
    --cover-color        : #000000;
    --cover-heading-color: #000000;
    --cover-max-width    : 80em;

    /* Change navbar's style*/
    --sidebar-nav-pagelink-background-image: none;
    --sidebar-nav-link-before-content-l3   : none;

    /* Change table's style */
    --table-cell-border-color : #d9d9d9;
    --table-cell-border-width : 1px;
    --table-head-border-width : 2px;
    --table-head-border-color : var(--table-cell-border-color);
    --table-body-border-width : 2px;
    --table-body-border-color : var(--table-cell-border-color);
    --table-row-odd-background: var(--table-row-even-background);

    /* Change quote's style */
    --blockquote-color        : #696969;
    --blockquote-em-font-style: italic;

    /* Change link's style */
    --link-color          : var(--theme-color);
    --link-text-decoration: none;

    /* Remove left padding for line number */
    --code-block-padding: 1.75em 1.5em 1.5em 0em;

    --heading-h6-margin: 0;

    /* For .stsc class */
    --standard-placeholder-color   : #0b87da;
    --standard-optional-color      : #0b87da30;
    /* --standard-optional-color   : #cce5ff; */
}

/* Change table's border style */
.markdown-section td,
.markdown-section th {
    border-color: var(--table-cell-border-color);
    border-style: dashed;
    border-width: var(--table-cell-border-width, 0);
}

/* Fix sidebar fold arrow */

.sidebar-nav li>a[href^='#/']:not([href*='?id=']):not(:only-child) {
    background-image: var(--sidebar-nav-pagelink-background-image--collapse,
            var(--sidebar-nav-pagelink-background-image--loaded,
                var(--sidebar-nav-pagelink-background-image)));
    background-position: var(--sidebar-nav-pagelink-background-position--collapse,
            var(--sidebar-nav-pagelink-background-position--loaded,
                var(--sidebar-nav-pagelink-background-image)));
}

.sidebar-nav li.open>a[href^='#/']:not([href*='?id=']):not(:only-child) {
    background-image: var(--sidebar-nav-pagelink-background-image--active,
            var(--sidebar-nav-pagelink-background-image--loaded,
                var(--sidebar-nav-pagelink-background-image)));
    background-position: var(--sidebar-nav-pagelink-background-position--active,
            var(--sidebar-nav-pagelink-background-position--loaded,
                var(--sidebar-nav-pagelink-background-image)));
}

/* Justify button size in the cover */
.cover p {
    font-size: large;
}

/**
 * Personal styles
 * .io class: Input/Output blocks
 * .sdsc class: Standard specifications
 * .table-code: Code blocks in table
*/
pre.io,
pre.table-code,
pre.sdsc {
    background-color: var(--code-theme-background);
    padding         : var(--code-block-padding);
    padding-left    : 1.5em;
    overflow        : auto;
}

.hint {
    content    : 输入输出;
    position   : absolute;
    top        : 0.75em;
    right      : 0.75em;
    opacity    : 0.6;
    color      : inherit;
    font-size  : var(--font-size-s);
    line-height: 1;
}

/* code.sdsc {
    background: var(--code-theme-background) !important;
} */

pre.table-code {
    max-width: 300px;
    padding  : .8em;
}

h1 sub,
h1 sup {
    font-size: var(--base-font-size);
}

/* Change Chinese font to sans-serif, because the default font 宋体 is hard to read. */
body[data-platform^="Win"] .sdsc {
    font-family: Inconsolata, Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, "Microsoft YaHei", 微软雅黑, "MicrosoftJhengHei", 华文细黑, STHeiti, MingLiu, "SimHei", monospace;
}

/* Placeholder */
.sdsc em,
.sdsc i {
    font-style: normal !important;
    color     : var(--standard-placeholder-color);
}

/* Optional */
.sdsc opt-block,
.sdsc strong,
.sdsc b {
    /* Round border */
    padding         : 3px;
    border-radius   : 4px;
    border-style    : none;
    background-color: var(--standard-optional-color);
    text-decoration : none;
}

.sdsc strong,
.sdsc b {
    color      : var(--standard-placeholder-color);
    font-style : normal;
    font-weight: normal !important;
}

.sdsc opt-block {
    display: inline-block;
}

.sdsc x-or {
    display      : inline;
    padding      : 2px;
    border       : 1px solid var(--standard-placeholder-color);
    border-radius: 3px;
    overflow     : hidden;
}

.sdsc x-or hr {
    height             : calc(1.2em + 5px);
    width              : 2em;
    margin             : 0;
    margin-bottom      : calc(-0.2em - 3px);
    border             : none;
    display            : inline-block;
    border-bottom      : 0;
    background-image   : url(assets/or.svg);
    background-size    : calc(1.2em + 6px) calc(1.2em + 6px);
    background-position: 0.2em 0;
    background-repeat  : no-repeat;
}

.sdsc hr {
    margin: 1em 0;
}

.sdsc.table-code {
    font-size: smaller;
}

.markdown-section pre[data-lang] {
    /**
     * Fix line number in code block. 
     * Change this overflow attr to <pre> not the <code>.
     */
    overflow: auto !important;
}

/* Fix line number. */
.markdown-section pre[data-lang] code {
    overflow: visible;
}

/* Change line number style */
.line-numbers .line-numbers-rows {
    border-right : 2px solid white;
    /* Fix paddings to align with code.*/
    padding      : var(--code-block-padding);
    padding-left : 0;
    padding-right: 0;
}

/* Remove decoration of <a> */
.markdown-section a.anchor:hover {
    text-decoration: none;
}

/* Make inline codes auto-wrap */
.markdown-section code:not([class*="lang-"]):not([class*="language-"]) {
    white-space: pre-wrap;
}

.runcode {
    margin    : -1em 0;
    font-size : smaller;
    text-align: right;
}

div.table-wrapper+p.small {
    margin-top: -1em;
    font-size : var(--small-font-size);
}

.runcode a {
    color: gray;
}